package com.dmp.onlinestore.model.dao;

import java.util.List;
import com.dmp.onlinestore.model.dto.*;
import com.dmp.onlinestore.model.dao.base.DaoException;

public interface PersonDao {
	
	// Get all Persons from the database.
	public List<PersonBean> getPersons() throws DaoException;
	
	// Get the person specified by the person id.
	public PersonBean getPersonById(int personId) throws DaoException;
	
	// Adds a new person to the database. A unique id is allocated
	// for this new person and so the person, by definition is unique.
	// Throws an exception if the person could not be added. Throws
	// an exception of the person's id is not -1 (is already in the
	// database. Sets the person's id upon successful insertion into
	// the database.
	public void addPerson(PersonBean person) throws DaoException;
}
